diff --git a/gralloc/alloc_device.cpp b/gralloc/alloc_device.cpp
index 3ef099f..6773405 100644
--- a/gralloc/alloc_device.cpp
+++ b/gralloc/alloc_device.cpp
@@ -128,17 +128,19 @@
 			return -1;
 		}
 
+		// we do not need ion_hnd once we have shared_fd
+		if (0 != ion_free(m->ion_client, ion_hnd))
+		{
+			AWAR("ion_free( %d ) failed", m->ion_client);
+		}
+		ion_hnd = ION_INVALID_HANDLE;
+
 		cpu_ptr = (unsigned char *)mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, shared_fd, 0);
 
 		if (MAP_FAILED == cpu_ptr)
 		{
 			AERR("ion_map( %d ) failed", m->ion_client);
 
-			if (0 != ion_free(m->ion_client, ion_hnd))
-			{
-				AERR("ion_free( %d ) failed", m->ion_client);
-			}
-
 			close(shared_fd);
 			return -1;
 		}
@@ -148,7 +150,6 @@
 		if (NULL != hnd)
 		{
 			hnd->share_fd = shared_fd;
-			hnd->ion_hnd = ion_hnd;
 			*pHandle = hnd;
 			return 0;
 		}
@@ -165,13 +166,6 @@
 			AERR("munmap failed for base:%p size: %lu", cpu_ptr, (unsigned long)size);
 		}
 
-		ret = ion_free(m->ion_client, ion_hnd);
-
-		if (0 != ret)
-		{
-			AERR("ion_free( %d ) failed", m->ion_client);
-		}
-
 		return -1;
 	}
 #endif
@@ -306,9 +300,10 @@
 		vaddr = (void *)((uintptr_t)vaddr + bufferSize);
 	}
 
+	int fbdev_fd = m->framebuffer->shallow_fbdev_fd;
 	// The entire framebuffer memory is already mapped, now create a buffer object for parts of this memory
 	private_handle_t *hnd = new private_handle_t(private_handle_t::PRIV_FLAGS_FRAMEBUFFER, usage, size, vaddr,
-	        0, dup(m->framebuffer->fd), (uintptr_t)vaddr - (uintptr_t) m->framebuffer->base);
+	        0, fbdev_fd, (uintptr_t)vaddr - (uintptr_t) m->framebuffer->base);
 #if GRALLOC_ARM_UMP_MODULE
 	hnd->ump_id = m->framebuffer->ump_id;
 
@@ -330,7 +325,7 @@
 #ifdef FBIOGET_DMABUF
 		struct fb_dmabuf_export fb_dma_buf;
 
-		if (ioctl(m->framebuffer->fd, FBIOGET_DMABUF, &fb_dma_buf) == 0)
+		if (ioctl(fbdev_fd, FBIOGET_DMABUF, &fb_dma_buf) == 0)
 		{
 			AINF("framebuffer accessed with dma buf (fd 0x%x)\n", (int)fb_dma_buf.fd);
 			hnd->share_fd = fb_dma_buf.fd;
@@ -518,7 +513,6 @@
 		const size_t bufferSize = m->finfo.line_length * m->info.yres;
 		int index = ((uintptr_t)hnd->base - (uintptr_t)m->framebuffer->base) / bufferSize;
 		m->bufferMask &= ~(1 << index);
-		close(hnd->fd);
 
 #if GRALLOC_ARM_UMP_MODULE
 
@@ -560,11 +554,6 @@
 
 		close(hnd->share_fd);
 
-		if (0 != ion_free(m->ion_client, hnd->ion_hnd))
-		{
-			AERR("Failed to ion_free( ion_client: %d ion_hnd: %p )", m->ion_client, (void *)(uintptr_t)hnd->ion_hnd);
-		}
-
 		memset((void *)hnd, 0, sizeof(*hnd));
 #else
 		AERR("Can't free dma_buf memory for handle:0x%x. Not supported.", (unsigned int)hnd);
diff --git a/gralloc/framebuffer_device.cpp b/gralloc/framebuffer_device.cpp
index 3004778..bacefee 100644
--- a/gralloc/framebuffer_device.cpp
+++ b/gralloc/framebuffer_device.cpp
@@ -94,9 +94,11 @@
 #define FBIO_WAITFORVSYNC       _IOW('F', 0x20, __u32)
 #define S3CFB_SET_VSYNC_INT _IOW('F', 206, unsigned int)
 
-		if (ioctl(m->framebuffer->fd, FBIOPAN_DISPLAY, &m->info) == -1)
+		int fbdev_fd = m->framebuffer->shallow_fbdev_fd;
+
+		if (ioctl(fbdev_fd, FBIOPAN_DISPLAY, &m->info) == -1)
 		{
-			AERR("FBIOPAN_DISPLAY failed for fd: %d", m->framebuffer->fd);
+			AERR("FBIOPAN_DISPLAY failed for fd: %d", fbdev_fd);
 			m->base.unlock(&m->base, buffer);
 			return 0;
 		}
@@ -106,9 +108,9 @@
 			// enable VSYNC
 			interrupt = 1;
 
-			if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0)
+			if (ioctl(fbdev_fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0)
 			{
-				//      AERR("S3CFB_SET_VSYNC_INT enable failed for fd: %d", m->framebuffer->fd);
+				//      AERR("S3CFB_SET_VSYNC_INT enable failed for fd: %d", fbdev_fd);
 				return 0;
 			}
 
@@ -118,9 +120,9 @@
 #endif
 			int crtc = 0;
 
-			if (ioctl(m->framebuffer->fd, FBIO_WAITFORVSYNC, &crtc) < 0)
+			if (ioctl(fbdev_fd, FBIO_WAITFORVSYNC, &crtc) < 0)
 			{
-				AERR("FBIO_WAITFORVSYNC failed for fd: %d", m->framebuffer->fd);
+				AERR("FBIO_WAITFORVSYNC failed for fd: %d", fbdev_fd);
 #ifdef MALI_VSYNC_EVENT_REPORT_ENABLE
 				gralloc_mali_vsync_report(MALI_VSYNC_EVENT_END_WAIT);
 #endif
@@ -133,9 +135,9 @@
 			// disable VSYNC
 			interrupt = 0;
 
-			if (ioctl(m->framebuffer->fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0)
+			if (ioctl(fbdev_fd, S3CFB_SET_VSYNC_INT, &interrupt) < 0)
 			{
-				AERR("S3CFB_SET_VSYNC_INT disable failed for fd: %d", m->framebuffer->fd);
+				AERR("S3CFB_SET_VSYNC_INT disable failed for fd: %d", fbdev_fd);
 				return 0;
 			}
 		}
@@ -146,9 +148,9 @@
 		gralloc_mali_vsync_report(MALI_VSYNC_EVENT_BEGIN_WAIT);
 #endif
 
-		if (ioctl(m->framebuffer->fd, FBIOPUT_VSCREENINFO, &m->info) == -1)
+		if (ioctl(fbdev_fd, FBIOPUT_VSCREENINFO, &m->info) == -1)
 		{
-			AERR("FBIOPUT_VSCREENINFO failed for fd: %d", m->framebuffer->fd);
+			AERR("FBIOPUT_VSCREENINFO failed for fd: %d", fbdev_fd);
 #ifdef MALI_VSYNC_EVENT_REPORT_ENABLE
 			gralloc_mali_vsync_report(MALI_VSYNC_EVENT_END_WAIT);
 #endif
@@ -383,7 +385,7 @@
 
 	// Create a "fake" buffer object for the entire frame buffer memory, and store it in the module
 	module->framebuffer = new private_handle_t(private_handle_t::PRIV_FLAGS_FRAMEBUFFER, 0, fbSize, vaddr,
-	        0, dup(fd), 0);
+	        0, fd, 0);
 
 	module->numBuffers = info.yres_virtual / info.yres;
 	module->bufferMask = 0;
diff --git a/gralloc/gralloc_priv.h b/gralloc/gralloc_priv.h
index 5797725..547027e 100644
--- a/gralloc/gralloc_priv.h
+++ b/gralloc/gralloc_priv.h
@@ -182,11 +182,11 @@
 #endif
 
 	// Following members is for framebuffer only
-	int     fd;
+	int     shallow_fbdev_fd; // shallow copy, not dup'ed
 	int     offset;
 
 #if GRALLOC_ARM_DMA_BUF_MODULE
-	ion_user_handle_t ion_hnd;
+	ion_user_handle_t ion_hnd_UNUSED;
 #endif
 
 #if GRALLOC_ARM_DMA_BUF_MODULE
@@ -219,11 +219,11 @@
 		yuv_info(MALI_YUV_NO_INFO),
 		ump_id((int)secure_id),
 		ump_mem_handle((int)handle),
-		fd(0),
+		shallow_fbdev_fd(0),
 		offset(0)
 #if GRALLOC_ARM_DMA_BUF_MODULE
 		,
-		ion_hnd(ION_INVALID_HANDLE)
+		ion_hnd_UNUSED(ION_INVALID_HANDLE)
 #endif
 
 	{
@@ -253,9 +253,9 @@
 		ump_id((int)UMP_INVALID_SECURE_ID),
 		ump_mem_handle((int)UMP_INVALID_MEMORY_HANDLE),
 #endif
-		fd(0),
+		shallow_fbdev_fd(0),
 		offset(0),
-		ion_hnd(ION_INVALID_HANDLE)
+		ion_hnd_UNUSED(ION_INVALID_HANDLE)
 
 	{
 		version = sizeof(native_handle);
@@ -286,11 +286,11 @@
 		ump_id((int)UMP_INVALID_SECURE_ID),
 		ump_mem_handle((int)UMP_INVALID_MEMORY_HANDLE),
 #endif
-		fd(fb_file),
+		shallow_fbdev_fd(fb_file),
 		offset(fb_offset)
 #if GRALLOC_ARM_DMA_BUF_MODULE
 		,
-		ion_hnd(ION_INVALID_HANDLE)
+		ion_hnd_UNUSED(ION_INVALID_HANDLE)
 #endif
 
 	{
